import request from "@/utils/request2";

const DEPT_BASE_URL = "/api/v1/script/profile";


export function getListApi(params, name) {
    return request({
        url: `${DEPT_BASE_URL}/list/${name}`,
        method: "get",
        params
    });
}

export function getCountApi(params, name) {
    return request({
        url: `${DEPT_BASE_URL}/count/${name}`,
        method: "get",
        params
    });
}

export function createConfigApi(data, name) {
    return request({
        url: `${DEPT_BASE_URL}/create/${name}`,
        method: "post",
        data
    });
}

export function deleteConfigsApi(data, name) {
    return request({
        url: `${DEPT_BASE_URL}/delete/${name}`,
        method: "post",
        data
    });
}

export function updateConfigApi(data, name, id) {
    return request({
        url: `${DEPT_BASE_URL}/update/${name}/${id}`,
        method: "post",
        data
    });
}
